package day01;

import sun.awt.windows.ThemeReader;

public class Demo02  implements Runnable{
    public void run(){
        String name=Thread.currentThread().getName();
        for (int i = 0; i < 10; i++) {
            System.out.println(name+ " " + i);
        }
    }

    public static void main(String[] args) {
        Demo02 d1=new Demo02();
        Demo02 d2=new Demo02();
        Thread t1=new Thread(d1);
        Thread t2=new Thread(d1);
//        t.setName("d");
        t1.start();
        t2.start();


        Runnable run =new Runnable() {
            public void run() {

            }
        };
        Thread t3=new Thread(run);
        //lamba表达式
        Runnable run2=()->{

        };
        Thread t4=new Thread(run2);

    }
}
